<?php include './web/Tpl/default/public/before_body2.phtml'; ?>
<meta name="robots" content="nofollow">
<link href="/statics/front/css/partner-custom.css" rel="stylesheet">
<link href="/statics/front/showtip/showtips.css" rel="stylesheet">
</head>
<style>
.btn34 {
    width: 139px;
    height: 40px;
    line-height: 18px;
    font-size: 18px;
    color: #955686;
    background: url("/statics/images/bg34.jpg") no-repeat left top;
    padding-bottom: 4px;
}
.notAllowed{background: url(/statics/front/images/icons/notAllowed.png) no-repeat;}
.notAllowed a{opacity: 0.5; filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);}
</style>
<body class="bg-silver">

<script src="/statics/js/plugins/artDialog/jquery.artDialog.js?skin=default"></script>
<script src="/statics/js/plugins/artDialog/plugins/iframeTools.js"></script>
<?php if($type==1){ ?>
<link href="/statics/js/showtip/showtips.css" type="text/css" rel="stylesheet">
<script src="/statics/js/showtip/showTip.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
	$(".btn34").click(function(){
		$.ajax({
			type:"POST",
			url: "<?php echo U('order/edit_order_attribute_do');?>",
			data:{order_item_id:<?php echo $order_item_res['id'];?>},
			dataType:"json",
			success:function(obj){
				showTip(obj.message);
				if(obj.code==200){
					//刷新父窗口
					var win = art.dialog.open.origin;  
					win.location.reload();
					//关闭子窗口 
					setTimeout("art.dialog.close()", 2000 );
				}	
			}
		});
	});
});
</script>
<input class="btn34" value="保存" type="button">
<?php } ?>
<?php if(isset($attributeList) && $attributeList):?>
<div class="attr-content js-attr-content" data-goods-id="<?php echo $productInfo['id'];?>">
  <div class="panel js-first-panel">
    <?php
      $order_i=0;
      foreach ($attributeList as $attr_id => $attr):
        if($attr_id != 9999):
    ?>

    <?php if($attr['attr_pro_type'] == 0 && $attr_id != 83): $order_i++;?>
    <div class="attribute<?php if($attr_id == 75){echo ' js-shirt-cuffs';}?><?php if($attr_id == '69'){echo ' js-blazer-Lining-Unlined-no';}?><?php if($attr_id==172){?> js-cashmere-sweater-contrast-color<?php }?><?php if(in_array($attr_id,array(72,57,114))){ echo ' boutonniere_yes_type'; }?><?php if(in_array($attr_id,array(229,202))){ echo ' vest_lapel_yes_type';}?><?php if(in_array($attr_id,array(230))){ echo ' neckline_yes_type';}?><?php if(in_array($attr_id,array(231))){ echo ' sleeve_yes_type';}?>">
      <div class="attr-head">
        <i class="js-serial-num"><?php echo $order_i;?></i>
        <strong><?php echo $attr['name'];?></strong>
        <span data-attr-id="<?php echo $attr_id;?>" class="js-btn-help"><?php echo L('help');?></span>
      </div>
      <?php $mobile_active_img = '';?>
      <ul>
        <?php
          $j=0;
          if(isset($attr['values']) && $attr['values']):
            foreach ($attr['values'] as $attrv):
            $j++;
        ?>
        <?php if($attrv['label'])://删除的属性值不显示?>
        <li onClick="get_mianliao(<?php echo $attrv['attr_value_id'];?>)" id="hidden_miaoliao<?php echo $attrv['attr_value_id']; ?>" <?php if($attrv['libu_img']):?> data-img="<?php echo $attrv['libu_img'];?>"<?php endif;?> title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv['product_attr_id'] .':'. $attrv['label'].':'. $attrv['attr_value_id'];?>" class="<?php if($attr['default']== $attrv['product_attr_id']) echo 'selected';?><?php if(in_array($attr_id,array(26,96,60)) && in_array($attrv['attr_value_id'],array(81,294,183))){echo ' js-patch-pocket';}?><?php if($attr_id==149 && $attrv['attr_value_id']==833){echo ' js-shirt-short';}?><?php if($attr_id==76 && $attrv['attr_value_id']==242){echo ' js-shirt-pocket-none';}?><?php if(in_array($attrv['attr_value_id'],array(706,696,705))){echo ' js-suit-Four-Button';}?><?php if(in_array($attrv['attr_value_id'],array(283,7,60))){echo ' js-suit-Notch-Lapel';}?><?php if(in_array($attrv['attr_value_id'],array(281,5,58))){echo ' js-suit-Peak-Lapel';}?><?php if(in_array($attrv['attr_value_id'],array(194,195))){echo ' js-blazer-Facing-Curved-Straight';}?><?php if($attrv['attr_value_id'] == 854){echo ' js-blazer-Facing-Curved-Straight-no';}?><?php if($attrv['attr_value_id'] == 856){echo ' js-blazer-Facing-Arcuated';}?><?php if(in_array($attrv['attr_value_id'],array(855,202))){echo ' js-blazer-Facing-Arcuated-no';}?><?php if(in_array($attrv['attr_value_id'],array(203,202))){echo ' js-blazer-Lining-Full-Half';}?><?php if(in_array($attrv['attr_value_id'],array(853,861,863))){echo ' js-blazer-Lining-Full-Half-no';}?><?php if($attrv['attr_value_id'] == 855){echo ' js-blazer-Lining-Unlined';}?><?php if($attr_id == 68){echo ' js-blazer-Lining-li';}?><?php if($attr_id == 69){echo ' js-blazer-Lining-Color-li';}?><?php if($attrv['attr_value_id']==957){?> js-cashmere-sweater-no-contrast<?php }?><?php if(in_array($attr_id,array(22,2,93)) && in_array($attrv['attr_value_id'],array(703,697,704))){ echo ' js_clothes_collar_type'; }?><?php if(in_array($attr_id,array(25,4,95)) && in_array($attrv['attr_value_id'],array(1136,72,74,71,1137,70,705,1376,696,1130,175,176,174,1131,972,173,706,290,289,1287,288,1359))){ echo ' js_clothes_four_button_type'; }?>
            	<?php //特殊弧形挂面与半里的冲突?>
				<?php if(in_array($attr_id,array(29,63,98)) && in_array($attrv['attr_value_id'],array(1005,856,1301))){ echo ' js_clothes_facing_special_type'; }?>
				<?php if(in_array($attr_id,array(29,63,98)) && in_array($attrv['attr_value_id'],array(91,92,194,195,303,304))){ echo ' js_clothes_facing_ordinary_type'; }?>
				<?php if(in_array($attr_id,array(34,68,104)) && in_array($attrv['attr_value_id'],array(100,202,313))){ echo ' js_clothes_lining_ordinary_type'; }?>
				<?php if(in_array($attr_id,array(34,68,104)) && in_array($attrv['attr_value_id'],array(1004,854,1300))){ echo ' js_clothes_lining_special_type'; }?>
                <?php //青果领与插花眼开口的冲突?>
                <?php if(in_array($attr_id,array(2,22,93)) && in_array($attrv['attr_value_id'],array(172,62,280))){ echo ' js_clothes_lapel_special_type'; }?>
                <?php if(in_array($attr_id,array(120,91,118)) && in_array($attrv['attr_value_id'],array(369,370,277,278,362,363))){ echo ' js_clothes_boutonniere_special_type'; }?>
                <?php //插花眼无则插花眼撞色无?>
                <?php if(in_array($attr_id,array(120,91,118))){ if(in_array($attrv['attr_value_id'],array(864,1147,1148))){ echo ' js_clothes_boutonniere_no_type'; }else{ echo ' js_clothes_boutonniere_yes_type';}}?>
                <?php //U型领无手巾袋?>
                <?php if(in_array($attr_id,array(126,105))){ if(in_array($attrv['attr_value_id'],array(604,316))){ echo ' js_clothes_vest_lapel_no_type'; }else{ echo ' js_clothes_vest_lapel_yes_type';}}?>
                <?php //特定产品1647，英文站939的衣领为953 XC009(小戗驳领,针织单西） 则可以显示972XMD24R（圆摆双排2+4），972只为953显示?>
                <?php if(in_array($attr_id,array(2))){ if(in_array($attrv['attr_value_id'],array(953))){  echo 'js_clothes_lapel_abount_button_yes'; }else{ echo 'js_clothes_lapel_abount_button_no';}}?>
                <?php if(in_array($attr_id,array(4)) && in_array($attrv['attr_value_id'],array(972))){  echo 'js_clothes_button_abount_lapel_yes'; }?>
                <?php //xc007分割戗驳领只能选择一粒扣两粒扣?>
                <?php if(in_array($attr_id,array(2,22,93)) && in_array($attrv['attr_value_id'],array(851,1001,1352))){ echo 'js_clothes_b_l_type';}?>
                <?php if(in_array($attr_id,array(4,25,95)) && in_array($attrv['attr_value_id'],array(14,68,291))){ echo 'js_clothes_l_b_type'; }?>
                <?php //衬衫品类，如果是撞色部位是不撞色，则撞色颜色选项只有不撞色?>
                <?php if(in_array($attr_id,array(228)) && in_array($attrv['attr_value_id'],array(1273))){ echo 'js_clothes_contrast_position';}?>
                <?php if(in_array($attr_id,array(89))){ if(!in_array($attrv['attr_value_id'],array(501))){ echo 'js_clothes_contrast_position_no';} }?>
                 <?php //领型为909,1304,1125,1283,则显示领口部撞色 ?>
                <?php if(in_array($attr_id,array(56))){ if(in_array($attrv['attr_value_id'],array(909,1304,1125,1283))){ echo ' js_clothes_neckline_no_type'; }else{ echo ' js_clothes_neckline_yes_type';}}?>
                <?php //袖子为905,则显示袖口撞色 ?>
                <?php if(in_array($attr_id,array(75))){ if(in_array($attrv['attr_value_id'],array(905))){ echo ' js_clothes_sleeve_no_type'; }else{ echo ' js_clothes_sleeve_yes_type';}}?>
                <?php //锁眼线与撞色 ?>
                <?php 
					if(in_array($attr_id,array(247,249,251))){ 
						if(in_array($attrv['attr_value_id'],array(1446,1458,1470))){ //全部撞色
							echo ' js_clothes_buttonholes_type_one'; 
						}elseif(in_array($attrv['attr_value_id'],array(1445,1457,1469))){  //插花眼+袖口最后一个扣眼
							echo ' js_clothes_buttonholes_type_two';
						}elseif(in_array($attrv['attr_value_id'],array(1444,1456,1468))){  //顺大身色
							echo ' js_clothes_buttonholes_type_three';
						} 
					}
				?>
                <?php
                	if(in_array($attr_id,array(248,250,252))){ 
						if($attr['default']== $attrv['product_attr_id']){ //后台默认色
							echo " js_clothes_contrast_buttonholes_color_type_one";
						}
						if(in_array($attrv['attr_value_id'],array(1454,1466,1478))){
							echo " js_clothes_contrast_buttonholes_color_type_three";
						}
						if(!in_array($attrv['attr_value_id'],array(1454,1466,1478))){  //所有颜色（去除顺色）
							echo " js_clothes_contrast_buttonholes_color_type_two";
						}
					}
				?>
                ">
              <a href="javascript:">
                <?php if($attr['default']== $attrv['product_attr_id']) $mobile_active_img = $attrv['image2'];?>
                <img src="<?php echo $attrv['image'];?>">
                <img src="<?php echo $attrv['image2'];?>" class="active">
              </a>
              <p class="attr-val"><?php if($attr['default']== $attrv['product_attr_id']){ echo "<font color='red'>";} ?><?php echo $attrv['label'];?><?php if($attr['default']== $attrv['product_attr_id']){ echo "</font>";} ?><?php echo $attrv['add_money']>0?"<br>(+".currency($attrv['add_money']).")":"";?></p>
            </li>
        <?php endif;?>
        <?php
            endforeach;
          endif;
        ?>
      </ul>
      <?php if(in_array($attr_id,array(29,98,63))):?>
      <img src="/statics/front/images/custom/facing.jpg" alt="facing" class="pull-right<?php if($productInfo['catid'] == 2162):?> js-casual-blazer-facing<?php endif;?>" />
      <?php endif;?>
      <?php if(in_array($attr_id,array(104,34,68))):?>
      <img src="/statics/front/images/custom/lining.jpg" alt="lining" class="pull-right<?php if($productInfo['catid'] == 2162):?> js-casual-blazer-lining<?php endif;?>" />
      <?php endif;?>
      <?php if(in_array($attr_id,array(107,129))):?>
      <img src="/statics/front/images/custom/vest.jpg" alt="vest" class="pull-right">
      <?php endif;?>
    </div>
    <?php endif; ?>

    <?php if($attr['attr_pro_type'] == 4): $order_i++;?>
    <div class="attribute">
      <div class="attr-head">
        <i class="js-serial-num"><?php echo $order_i;?></i>
        <strong><?php echo L('_options_');?></strong>
      </div>
      <ul class="more-option js-more-option">
        <?php
          foreach ($attributeList as $op_attr_id => $op_attr):
            if($op_attr['attr_pro_fid'] == $attr_id && $op_attr['attr_pro_type'] == 5):
        ?>
        <li>
          <span>
            <img src="<?php echo $op_attr['image'];?>" alt="<?php echo $op_attr['attr_content'];?>" class="needsclick" />
           <!-- <?php if($productInfo['3d_show'] && $op_attr['issd']):?><i class="tag-3d js-tag-3d">3D</i><?php endif;?>-->
          </span>
          <label class="option-name">
            <input type="checkbox" value="<?php echo $op_attr_id;?>" <?php if($op_attr['default']):?>checked<?php endif;?> />
            <em class="needsclick"><?php echo $op_attr['name']?></em>
          </label>
          <div class="js-radio-box"<?php if(intval($op_attr['default'])==0):?> style="display:none;"<?php endif;?>>
            <?php foreach($op_attr['values'] as $attrv3):?>
            <label>
              <input type="radio" name="<?php echo $op_attr['name'];?>" <?php if(($op_attr['default'] == $attrv3['product_attr_id']) || (!$op_attr['default'] && $op_attr['s_default']== $attrv3['product_attr_id'])) echo 'checked';?> value="<?php echo $attrv3['attr_value_id'];?>" title="<?php echo $op_attr_id.':'.$op_attr['name'].':'.$attrv3['product_attr_id'] .':'. $attrv3['label'].':'. $attrv3['attr_value_id'];?>" />
              <em class="needsclick"><?php echo $attrv3['label'];?></em>
            </label>
            <?php endforeach;?>
          </div>
        </li>
        <?php
            endif;
          endforeach;
        ?>

        <?php
          foreach($attr['values'] as $attrv2):
        ?>
        <li class="<?php if(in_array($attrv2['attr_value_id'],array(345,273,209))){echo 'js-waist-pocket';}?><?php if(in_array($attrv2['attr_value_id'],array(210,136,342))){echo 'js-sleeve-slit';}?><?php if(in_array($attrv2['attr_value_id'],array(761,762,765))){echo 'js-rounded-cuff';}?>">
          <span>
            <img src="<?php echo $attrv2['image']; ?>" alt="<?php echo $attrv2['attr_content']?>" class="needsclick" />
            <!--<?php if($productInfo['3d_show'] && $attrv2['issd']):?><i class="tag-3d js-tag-3d">3D</i><?php endif;?>-->
          </span>
          <label class="option-name">
            <input type="checkbox" <?php $default_arr = explode('|',$attr['default']); if(in_array($attrv2['product_attr_id'],$default_arr)) echo 'checked';?>  value="<?php echo $attrv2['attr_value_id']; ?>" title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'].':'. $attrv2['attr_value_id'];?>" />
            <em class="needsclick"><?php echo $attrv2['label']; ?></em>
          </label>
        </li>
        <?php endforeach;?>

        <?php
          foreach ($attributeList as $op_attr_id => $op_attr):
            if($op_attr['attr_pro_fid'] == $attr_id && $op_attr['attr_pro_type'] == 3):
        ?>
        <li>
          <span>
            <img src="<?php echo $op_attr['image'];?>" alt="<?php echo $op_attr['attr_content'];?>" class="needsclick" />
           <!-- <?php if($productInfo['3d_show'] && $op_attr['issd']):?><i class="tag-3d js-tag-3d">3D</i><?php endif;?>-->
          </span>
          <label class="option-name">
            <input type="checkbox" value="<?php echo $op_attr_id;?>" <?php if($op_attr['default']):?>checked<?php endif;?> />
            <em class="needsclick"><?php echo $op_attr['name'];?></em>
          </label>
          <div id="attr_dis_<?php echo $op_attr_id;?>" class="radio-box js-radio-box" <?php if(intval($op_attr['default'])==0):?>style="display:none;"<?php endif;?> >
            <?php
              $jk=0;
              if(isset($op_attr['values']) && $op_attr['values']):
                foreach ($op_attr['values'] as $attrv):
                  $jk++;
            ?>
            <span id="attr_<?php echo $op_attr_id?>_<?php echo $jk;?>"<?php if(($op_attr['default']== $attrv['product_attr_id']) || (!$op_attr['default'] && $op_attr['s_default']== $attrv['product_attr_id'])):?> class="selected"<?php endif;?> title="<?php echo $attrv['label'];?>" data-title="<?php echo $op_attr_id.':'.$attr['name'].':'.$attrv['product_attr_id'] .':'. $attrv['label'].':'. $attrv['attr_value_id'];?>">
              <img src="<?php echo $attrv['image'];?>" id="attrv_<?php echo $attrv['attr_value_id'];?>" />
            </span>
            <?php
                endforeach;
              endif;
            ?>
          </div>
        </li>
        <?php
            endif;
          endforeach;
        ?>
      </ul>
    </div>
    <?php endif; ?>

    <?php
        endif;
      endforeach;
    ?>
  </div>

  <?php
    if(isset($attributeList[9999])):
      $help_attr_first_id = 0;
      $help_attr_count = 0;
      foreach ($attributeList as $attr_id => $attr){
        if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 1) {
          if($help_attr_first_id == 0) $help_attr_first_id = $attr_id;
          $help_attr_count ++;
        }
      }
  ?>
  <div class="panel">
    <?php if($productInfo['model_id'] != 25):?>
      <div class="attribute">
        <div class="attr-head">
          <i class="js-serial-num"><?php $order_i++;echo $order_i;?></i>
          <strong>
          <?php if($productInfo['model_id'] == 14):?>
          <?php echo L('shirt_monogram');?>
          <?php elseif($productInfo['model_id'] == 22):?>
          <?php echo L('coat_monogram');?>
          <?php else:?>
          <?php echo L('jacket_monogram');?>
          <?php endif;?>
          </strong>
          <span data-attr-id="<?php echo $help_attr_first_id;?>" class="js-btn-help"><?php echo L('help');?></span>
        </div>
        <table class="monogram<?php if($productInfo['model_id'] != 14):?> pull-left<?php endif;?>">
          <tr>
            <th><?php echo L('text');?></th>
            <td>
              <?php
                $textcss_i = 1;
                foreach ($attributeList as $attr_id => $attr):
                  if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 1):
              ?>
              <label>
                <em><?php echo L('line'.$textcss_i);?>:</em>
                <?php $max_size = ($productInfo['model_id'] == 14 ? 10 : ($productInfo['model_id'] == 22 ? 15 : 20));?>
                <input type="text" value="<?php if(isset($attr['default']) && $attr['default']){echo $attr['default'];}else{ echo '('.L("_MAX_".$max_size).')';}?>" title="<?php echo $attr_id.':'.$attr['name'].'::'.(isset($attr['default_value']) && $attr['default_value'] ? $attr['default_value'] : '');?>" maxlength="<?php echo $max_size;?>" data-default="(<?php echo L('_MAX_'.$max_size);?>)" class="js-preview-text js-text<?php echo $textcss_i>1 ? $textcss_i-1 : '';?>" />
              </label>
              <?php
                  $textcss_i++;
                  endif;
                endforeach;
              ?>
            </td>
          </tr>
          <tr>
            <th><?php echo L('font');?></th>
            <td class="font-box js-font-box">
              <?php
                foreach ($attributeList as $attr_id => $attr):
                  if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 2):
                    foreach($attr['values'] as $attrv2):
              ?>
              <img src="<?php echo $attrv2['image']; ?>" title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'] .':'. $attrv2['attr_value_id'];?>" width="40" height="40"<?php if($attr['default'] == $attrv2['product_attr_id']):?> class="selected"<?php endif;?> />
              <?php endforeach;endif;endforeach;?>
            </td>
          </tr>
          <tr>
            <th><?php echo L('font_color');?></th>
            <td class="color-box js-color-box">
              <?php
                foreach ($attributeList as $attr_id => $attr):
                  if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 3):
                    foreach($attr['values'] as $attrv2):
                      $back_color = '#FFFFFF';
                      $color_arr = explode('#',$attrv2['label']);
                      if(is_array($color_arr) && isset($color_arr)){
                        $back_color = '#'.$color_arr[1];
                      }
              ?>
              <span style="background-image:url(<?php echo $attrv2['image'];?>)" title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'] .':'. $attrv2['attr_value_id'];?>" <?php if($attr['default'] == $attrv2['product_attr_id']):?>class="selected"<?php endif;?> ></span>
              <?php endforeach;endif;endforeach;?>
            </td>
          </tr>
          <tr>
            <th><?php echo L('_Preview_');?></th>
            <td class="preview-effect js-preview-effect" style="background: url(<?php echo $productInfo['ml_img'];?>) 50% 0% / cover #ccc">
              <span></span>
              <?php if($help_attr_count>1):?>
              <span></span>
              <?php endif;?>
            </td>
          </tr>
        </table>
        <?php if($productInfo['model_id'] != 14):?>
          <?php if($productInfo['model_id'] == 22):?>
          <img src="/statics/front/images/custom/monogram-wind-coat.png" class="pull-right">
          <?php else:?>
          <img src="/statics/front/images/custom/monogram.png" class="pull-right">
          <?php endif; ?>
        <?php endif; ?>
      </div>
      <?php if(isset($attributeList[83]) && !empty($attributeList[83])):
        $order_i++;
        $attr_id = 83;
        $attr    = $attributeList[83];
      ?>
      <!-- 衬衣绣字的位置, start -->
      <div class="attribute">
        <div class="attr-head">
          <i class="js-serial-num"><?php echo $order_i;$order_i++;?></i>
          <strong><?php echo $attr['name'];?></strong>
          <span data-attr-id="<?php echo $attr_id;?>" class="js-btn-help"><?php echo L('help');?></span>
        </div>
        <ul>
          <?php
            $j=0;
            if(isset($attr['values']) && $attr['values']):
              foreach ($attr['values'] as $attrv):
              $j++;
          ?>
          <li title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv['product_attr_id'] .':'. $attrv['label'].':'. $attrv['attr_value_id'];?>" class="<?php if($attr['default']== $attrv['product_attr_id']) echo 'selected';?><?php if($attr_id==83 && $attrv['attr_value_id']==260){echo ' js-shirt-location-cuff';}?><?php if($attr_id==83 && $attrv['attr_value_id']==259){echo 'js-shirt-location-pocket';}?>">
            <a href="javascript:">
              <img src="<?php echo $attrv['image'];?>" />
              <img src="<?php echo $attrv['image2'];?>" class="active" />
            </a>
            <p class="attr-val"><?php echo $attrv['label'];?></p>
          </li>
          <?php
              endforeach;
            endif;
          ?>
        </ul>
      </div>
      <!-- 衬衣绣字的位置, end -->
      <?php endif; ?>
      <?php else:?>
      <!-- 皮鞋刻字, start -->
      <div class="attribute">
        <div class="attr-head">
          <i class="js-serial-num"><?php echo 2;?></i>
          <strong><?php echo L('LETTERING');?></strong>
          <span data-attr-id="155" class="js-btn-help"><?php echo L('help');?></span>
        </div>
        <table class="monogram">
          <tr>
            <th><?php echo $attributeList[157]['name'];?></th>
            <td class="radio-group js-radio-group">
              <?php
                $background_img = '';
                foreach ($attributeList as $attr_id => $attr):
                  if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 2):
                    foreach($attr['values'] as $index => $attrv2):
              ?>
              <label title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'] .':'. $attrv2['attr_value_id'];?>" data-img="<?php echo $attrv2['image']; ?>"<?php if($index == 0): ?> class="mr2x"<?php endif;?>>
                <i class="radiobox<?php if($attr['default'] == $attrv2['product_attr_id']):$background_img = $attrv2['image'];?> checked<?php endif;?>"></i>
                <em><?php echo $attrv2['label']; ?></em>
              </label>
              <?php endforeach;endif;endforeach;?>
            </td>
          </tr>
          <tr>
            <th><?php echo L('text');?></th>
            <td>
              <?php
                $textcss_i = 1;
                foreach ($attributeList as $attr_id => $attr):
                  if($attr['attr_pro_fid'] == '9999' && $attr['attr_pro_type'] == 1):
              ?>
              <label>
                <em><?php echo L('line'.$textcss_i);?>:</em>
                <?php $max_size = 10; ?>
                <input type="text" value="<?php if(isset($attr['default']) && $attr['default']){echo $attr['default'];}else{ echo '('.L("_MAX_".$max_size).')';}?>" title="<?php echo $attr_id.':'.$attr['name'].'::'.(isset($attr['default_value']) && $attr['default_value'] ? $attr['default_value'] : '');?>" maxlength="<?php echo $max_size;?>" data-default="(<?php echo L('_MAX_'.$max_size);?>)" class="js-preview-text">
              </label>
              <?php
                  $textcss_i++;
                  endif;
                endforeach;
              ?>
            </td>
          </tr>
          <tr>
            <th><?php echo L('_Preview_');?></th>
            <td class="preview-effect shoes-preview js-preview-effect" style="background: url(<?php echo $background_img;?>) 50% 0% / cover #ccc"></td>
          </tr>
        </table>
      </div>
      <!-- 皮鞋刻字, end -->
      <?php endif; ?>
    </div>
  <?php endif; ?>
  <?php
    if($productInfo['model_id'] == 25):
  ?>
  <!-- 皮鞋尺码, start -->
  <div class="panel">
    <div class="attribute">
      <div class="attr-head">
        <i class="js-serial-num"><?php echo $order_i+1;?></i>
        <strong><?php echo L('_measurement_');?></strong>
      </div>
      <table class="pull-left mb2x foot-measurements">
        <tr>
          <th class="pl1x pb1x"><?php echo $attributeList[158]['name'];?></th>
          <td class="pb1x radio-group js-radio-group">
            <?php
              foreach ($attributeList as $attr_id => $attr):
                if($attr['attr_pro_fid'] == '9998' && $attr['attr_pro_type'] == 2):
                  foreach($attr['values'] as $attrv2):
            ?>
            <label title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'] .':'. $attrv2['attr_value_id'];?>"<?php if($attr['default'] == $attrv2['product_attr_id']):?> class="mr2x"<?php endif;?>>
              <i class="radiobox<?php if($attr['default'] == $attrv2['product_attr_id']):?> checked<?php endif;?>"></i>
              <em><?php echo $attrv2['label']; ?></em>
            </label>
            <?php endforeach;endif;endforeach;?>
          </td>
        </tr>
        <?php
          foreach ($attributeList as $attr_id => $attr):
            if($attr['attr_pro_fid'] == '9998' && $attr['attr_pro_type'] == 1):
              foreach($attr['values'] as $attrv2):
        ?>
        <tr>
          <th class="pl1x pb2x"><?php echo $attr['name']; ?></th>
          <td class="pb2x">
            <?php $max_size = ($productInfo['model_id'] == 14 ? 10 : ($productInfo['model_id'] == 22 ? 15 : 20));?>
            <input type="text" title="<?php echo $attr_id.':'.$attr['name'].'::'.(isset($attr['default_value']) && $attr['default_value'] ? $attr['default_value'] : '');?>" value="<?php echo $attr['default'];?>" class="js-foot-size">
          </td>
        </tr>
        <?php endforeach;endif;endforeach;?>
      </table>
      <table class="foot-measurements">
        <tr>
          <td colspan="2" class="pl1x pb1x"><?php echo L('How_to_measure');?></td>
        </tr>
        <tr>
          <td colspan="2" class="pl1x">
            <img src="/statics/front/images/custom/foot-length.png" alt="foot length">
          </td>
        </tr>
      </table>
    </div>

    <div class="attribute">
      <div class="attr-head">
        <i class="js-serial-num"><?php  echo $order_i+2;?></i>
        <strong><?php echo L('STANDARD_SIZE');?></strong>
      </div>
      <p class="ml1x mb1x"><?php echo L('STANDARD_SIZE_TIPS');?></p>
      <table class="mb1x foot-measurements">
        <tr>
          <th class="pl1x pb1x"><?php echo $attributeList[161]['name'];?></th>
          <td class="pb1x radio-group js-radio-group js-shoe-size">
            <?php
              $attr_id = 161;//常用尺码 尺码单位
              $attr = $attributeList[$attr_id];
              $shoe_size_unit_id = 0;
                foreach($attr['values'] as $attrv2):
            ?>
            <label title="<?php echo $attr_id.':'.$attr['name'].':'.$attrv2['product_attr_id'] .':'. $attrv2['label'] .':'. $attrv2['attr_value_id'];?>"<?php if($attr['default'] == $attrv2['product_attr_id']):?> class="mr2x"<?php endif;?>>
              <i class="radiobox<?php if($attr['default'] == $attrv2['product_attr_id']):$shoe_size_unit_id = $attrv2['attr_value_id'];?> checked<?php endif;?>"></i>
              <em><?php echo $attrv2['label']; ?></em>
            </label>
            <?php endforeach;?>
          </td>
        </tr>
        <?php
          $attr_id = 162;//常用尺码 尺码值
          $attr = $attributeList[$attr_id];
          if($shoe_size_unit_id == 895){
            $us_default_value = $attr['default'] ? $attr['default'] : C('shoe_size_us_default');
            $eu_default_value = C('shoe_size_eu_default');
          }else if($shoe_size_unit_id == 894){
            $us_default_value = C('shoe_size_us_default');
            $eu_default_value = $attr['default'] ? $attr['default'] : C('shoe_size_eu_default');
          }
        ?>
        <tr>
          <th class="pb1x pl1x"><?php echo $attr['name'];?></th>
          <td class="pb1x">
            <div class="select-widget js-select-widget<?php if($shoe_size_unit_id == 895):?> hide<?php endif;?>" title="<?php echo $attr_id.':'.$attr['name'].'::'.(isset($attr['default_value']) && $attr['default_value'] ? $attr['default_value'] : '');?>">
              <i></i>
              <span></span>
              <select>
                <option value="" selected><?php echo L('please_select'); ?></option>
                <?php foreach($shoe_size as $sizeVal):?>
                <option value="<?php echo $sizeVal;?>"<?php echo $attr['default']==$sizeVal ? " selected" : ""?>><?php echo $sizeVal;?></option>
                <?php endforeach;?>
              </select>
            </div>
          </td>
        </tr>
      </table>
    </div>
  </div>
  <!-- 皮鞋尺码, end -->
  <?php endif;?>
</div>
<?php endif;?>
<input type="hidden" id="sel_custom_val" value="<?php echo $sel_custom_val; ?>">
<input type="hidden" id="msizedata" value="<?php echo $msizedata;?>" />
<input type='hidden' id="count_show_attr" value="<?php echo count($show_attr_array);?>">
<script src="/statics/front/showtip/showTip.js"></script>
<script src="/statics/front/js/scripts/front.js"></script>
<!-- build:js /statics/front/pkg/js/partner-custom.js -->
<script src="/statics/front/js/plugins/jquery.popupBox.js"></script>
<script src="/statics/front/js/scripts/partner/custom/common-new.js"></script>
<script src="/statics/front/js/scripts/partner/custom/help.js"></script>
<script src="/statics/front/js/scripts/partner/custom/img-tab.js"></script>
<script src="/statics/front/js/scripts/partner/custom/monogram.js"></script>
<script src="/statics/front/js/scripts/partner/custom/foot-measure.js"></script>
<script src="/statics/front/js/scripts/partner/custom/shoes.js"></script>
<script src="/statics/front/js/scripts/partner/custom/more-option-common.js"></script>
<script src="/statics/front/js/scripts/partner/custom/more-option.js"></script>
<script src="/statics/front/js/scripts/partner/custom/mobile.js"></script>
<script src="/statics/front/js/scripts/partner/custom/submit-custom.js"></script>
<!-- endbuild -->
<script>
function get_mianliao(attr_value_id){
	$("#attr_value_ul li").css('display',"");
	/* if(attr_value_id==856){//alert($("#hidden_miaoliao"+1064).css('display'));
		$("#hidden_miaoliao"+855).css('display',"none");
		$("#hidden_miaoliao"+202).css('display',"none");
		$("#hidden_miaoliao"+1064).css('display',"none");
		$("#hidden_miaoliao"+1065).css('display',"none");
	}else  */if(attr_value_id==921){
		$("#hidden_miaoliao"+100).css('display',"none");
	}else
	if(attr_value_id==91||attr_value_id==92){
		$("#hidden_miaoliao"+920).css('display',"none");
	}/* else
	if(attr_value_id==194||attr_value_id==195){
		$("#hidden_miaoliao"+854).css('display',"none");
		$("#hidden_miaoliao"+1064).css('display',"none");
		$("#hidden_miaoliao"+1065).css('display',"none");
	} */

}
window.onload=function(){
	if (!$(".js-next").hasClass('hide') && !$(".js-submit-custom").hasClass('hide')){
		$(".js-submit-custom").addClass('hide');;
	}
}
$('input[name=affirmPid]', window.parent.document).val("<?php echo $productInfo['id']; ?>");
</script>